# Schniepp Lab, 2018-2021

# Several helper functions
# calculate radian value of an angle

import numpy as np

def degree_to_radian(degree):
    return np.pi * degree / 180

# calculate degree value of an angle
def radian_to_degree(radian):
    return 180 * radian / np.pi

# calculate d0 + dd, unit in degree
def rotate_by_degree(d0, dd):
#     unit in degree
    df = d0 + dd
    df = df % 360
    return df